﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using WebApplication1.Models;

namespace WebApplication1.Controllers
{
    public class MoviesController : Controller
    {
        MoviesDBContext db = new MoviesDBContext();
        public IActionResult Index()
        {
            var movies = from m in db.Movies where m.ReleaseDate > new DateTime(1984, 6, 1) select m;
            return View(movies.ToList());
        }
    }
}